import {createRouter, createWebHashHistory} from "vue-router"

const home = () => import("/src/pages/home.vue")

const error = () => import("/src/pages/error.vue")

const routes = [
   {
      path: "/",
      name: "home",
      component: home,
   },

   {
      path: "/error",
      name: "error",
      component: error,
   },
   {
      path: '/:pathMatch(.*)',
      //redirect: '/error',
      component: error,
   },
]

export default createRouter({
   history: createWebHashHistory(),
   routes: routes
})
